<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
		<form name="form_search" id="form_search" action="{:U('index')}" method="post">
		    <table width="100%" cellspacing="0" class="search-form">
		        <tbody>
		            <tr>
			            <td>
				            <div class="explain-col">
				            	<select name="order_type" style="width:120px;" class="chosen_search" > 
									<option value="">--订单类型--</option>
	                				<volist name=":C('CST_ORDER_TYPE')" id="val">
								    	<option value="{$key}"  <if condition="$key eq $search['order_type'] and $search['order_type'] neq ''">selected</if>>{$key}-{$val}</option>
	                				</volist>
								</select>
				            	<select name="order_status" style="width:120px;" class="chosen_search">
									<option value="">--订单状态--</option>
	                				<volist name=":C('CST_ORDER_STATUS')" id="val">
								    	<option value="{$key}"  <if condition="$key eq $search['order_status'] and $search['order_status'] neq ''">selected</if>>{$key}-{$val}</option>
	                				</volist>
								</select>
								<select name="cust_order_status" style="width:120px;" class="chosen_search"  >
									<option value="">--客户订单--</option>
	                				<volist name=":C('CST_CUST_ORDER_STATUS')" id="val">
								    	<option value="{$key}"  <if condition="$key eq $search['cust_order_status'] and $search['cust_order_status'] neq ''">selected</if>>{$key}-{$val}</option>
	                				</volist>
								</select>						
								<input type="text" name="cust_order_time_start" id="cust_order_time_start" value="{$search.cust_order_time_start}" placeholder="开始日期">
								<input type="text" name="cust_order_time_end" id="cust_order_time_end" value="{$search.cust_order_time_end}" placeholder="截止日期">
								<input type="button"  name="form_search_btn_search"  value="查询" onclick="document.forms['form_search'].submit()"/>	
				        	</div>
			            </td>
		            </tr>
		        </tbody>
		    </table>
	    </form>
	    <form  name="form_list" id="form_list" action="{:U('index')}" method="post">
		    <div class="table-list">		
			    <table width="100%" cellspacing="0">
			        <thead>
			            <tr>
			            	<th width="100" align="center">订单类型</th> 
			            	<th width="100" align="center">订单状态</th> 
			            	<th width="100" align="left">退货状态</th> 
			            	<th width="100" align="center">订单数量</th>
			            	<th width="100" align="left">订单金额</th>               
			                <th width="100" align="left">配送费用</th>
			                <th width="100" align="left">客户实际支付</th>
			      			<th align="left">操作</th>
			            </tr>
			        </thead>
			    	<tbody>
						<volist name="orderStat.list" id='val'>
				        <tr>
				        	<td align="center">{$val.order_type|m_order_type=false}</td>
				            <td align="left">{$val.order_status|m_order_status}</td>
				            <td align="left">{$val.cust_order_status|m_cust_order_status}</td>
				            <td align="left">{$val.order_cnt}</td>
				            <td align="left">{$val.order_amt_sum}</td>
				            <td align="left">{$val.order_send_fee_sum}</td>
				            <td align="left">{$val.cust_pay_amt_sum}</td>
				            <td align="left" class="btn">
				            	<a class="link_btn" href="{:U('showDetail',array('order_code'=>$val['order_code']))}" target="_blank" >详情</a>
				            </td>
				        </tr>
				        </volist>
				        <tr style='background-color:#ccc;font-weight:800'>
				        	<td colspan="3" align="right">统计</td>
				        	<td  align="left">{$orderStat.orderCnt}单</td>
				        	<td  align="left">{$orderStat.orderAmt}元</td>
				        	<td  align="left">{$orderStat.orderSendFeeAmt}元</td>
				        	<td  align="left">{$orderStat.custPayAmt}元</td>
				        	<td align="left"></td>
				        </tr>
			    	</tbody>
			    </table>
	    	</div>
	    </form>
	</div>
	<div id="dialog_content" title="弹出框"></div>
<script type="text/javascript" src="__ROOT__/statics/scripts/jquery/jquery.ui.datepicker-zh.js"></script>
<script type="text/javascript">
$(function(){
	$.datepicker.setDefaults( $.datepicker.regional[ "zh" ] );
	$( "#cust_order_time_start" ).datepicker({
		dateFormat:'yy-mm-dd',
		changeYear: true,
		onClose:function(){
			$(this).blur();
		}
	});
	$( "#cust_order_time_end" ).datepicker({
		dateFormat:'yy-mm-dd',
		changeYear: true,
		onClose:function(){
			$(this).blur();
		}
	});
});
</script>
</block>